package 慕课网.homework4;

public class Banana extends Fruits{
    private String variety;
    public Banana(){

    }
    public Banana(String shape,String taste,String variety){
        super(shape, taste);
        this.setVariety(variety);
    }

    public String getVariety() {
        return variety;
    }

    public void setVariety(String variety) {
        this.variety = variety;
    }
    public void advantage(){
        System.out.println(this.getVariety()+"果形"+this.getShape()+"果肉香甜，可供生食");
    }
    public String advantage(String color){
       return this.getVariety()+"颜色为"+color;
    }
}
